package demo24;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sr=new Scanner(System.in);
        int x=sr.nextInt();
        int y=sr.nextInt();
        char[] a=new char[y];
        for (int i = 0; i < x; i++) {
            int i1= 'A' + i;
            char t=(char)i1;
            if(t=='A'){
                for (int j = 0; j < y; j++) {
                    System.out.print((char)(t+j));
                }
            }else {
                for (int j = 0; j < i&&j<y; j++) {
                    System.out.print((char)(t-j));
                }
                char t1='A';
                for (int j = i; j < y; j++) {
                    System.out.print((char)(t1++));
                }
            }
            System.out.println();
        }
    }
}
